<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ include file="/WEB-INF/jsp/commons/includes.jsp"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<!doctype html>
<html>
    <head>
        <jsp:include page="header.jsp"/>
        <title>开始</title>
    </head>
    <body>
        <!-- 头部 -->
        <div class="header">
            <!-- Logo -->
            <span class="logo"></span>
            <!-- /Logo -->

            <!-- 主导航 -->
            <ul class="main-nav">
                <li class=""><a href="/ot/admin.php?s=/Index/index.html">首页</a></li><li class=""><a href="/ot/admin.php?s=/Article/index.html">内容</a></li><li class="current"><a href="/ot/admin.php?s=/User/index.html">用户</a></li><li class=""><a href="/ot/admin.php?s=/Config/group.html">系统</a></li><li class=""><a href="/ot/admin.php?s=/Addons/index.html">扩展</a></li>        </ul>
            <!-- /主导航 -->

            <!-- 用户栏 -->
            <div class="user-bar">
                <a href="javascript:;" class="user-entrance"><i class="icon-user"></i></a>
                <ul class="nav-list user-menu hidden">
                    <li class="manager">你好，<em title="Administrator">Administrator</em></li>
                    <li><a href="/ot/admin.php?s=/User/updatePassword.html">修改密码</a></li>
                    <li><a href="/ot/admin.php?s=/User/updateNickname.html">修改昵称</a></li>
                    <li><a href="/ot/admin.php?s=/Public/logout.html">退出</a></li>
                </ul>
            </div>
        </div>
        <!-- /头部 -->

        <!-- 边栏 -->
        <jsp:include page="../commons/leftmenu.jsp"/>
        <!-- 边栏 -->

        <!-- 内容区 -->
        <div id="main-content">
            <div id="top-alert" class="fixed alert alert-error" style="display: none;">
                <button class="close fixed" style="margin-top: 4px;">&times;</button>
                <div class="alert-content">这是内容</div>
            </div>
            <div id="main" class="main">

                <!-- nav -->
                <!-- nav -->



                <!-- 标题栏 -->
                <div class="main-title">
                    <h2>用户列表1</h2>
                </div>
                <div class="cf">
                    <div class="fl">
                        <a class="btn" href="/ot/admin.php?s=/User/add.html">新 增</a>
                        <button class="btn ajax-post" url="/ot/admin.php?s=/User/changeStatus/method/resumeUser.html" target-form="ids">启 用</button>
                        <button class="btn ajax-post" url="/ot/admin.php?s=/User/changeStatus/method/forbidUser.html" target-form="ids">禁 用</button>
                        <button class="btn ajax-post confirm" url="/ot/admin.php?s=/User/changeStatus/method/deleteUser.html" target-form="ids">删 除</button>
                    </div>

                    <!-- 高级搜索 -->
                    <div class="search-form fr cf">
                        <div class="sleft">
                            <input type="text" name="nickname" class="search-input" value="" placeholder="请输入用户昵称或者ID">
                            <a class="sch-btn" href="javascript:;" id="search" url="/ot/admin.php?s=/User/index.html"><i class="btn-search"></i></a>
                        </div>
                    </div>
                </div>
                <!-- 数据列表 -->
                <div class="data-table table-striped">
                    <table class="">
                        <thead>
                        <tr>
                            <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
                            <th class="">UID</th>
                            <th class="">昵称</th>
                            <th class="">积分</th>
                            <th class="">登录次数</th>
                            <th class="">最后登录时间</th>
                            <th class="">最后登录IP</th>
                            <th class="">状态</th>
                            <th class="">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td><input class="ids" type="checkbox" name="id[]" value="1" /></td>
                            <td>1 </td>
                            <td>Administrator</td>
                            <td>80</td>
                            <td>25</td>
                            <td><span>2016-12-19 11:12</span></td>
                            <td><span>0.0.0.0</span></td>
                            <td>正常</td>
                            <td><a href="/ot/admin.php?s=/User/changeStatus/method/forbidUser/id/1.html" class="ajax-get">禁用</a>
                                <a href="/ot/admin.php?s=/AuthManager/group/uid/1.html" class="authorize">授权</a>
                                <a href="/ot/admin.php?s=/User/changeStatus/method/deleteUser/id/1.html" class="confirm ajax-get">删除</a>
                            </td>
                        </tr>			</tbody>
                    </table>
                </div>
                <div class="page">
                    <div>    </div>    </div>

            </div>
            <div class="cont-ft">
                <div class="copyright">
                    <div class="fl">感谢使用<a href="http://www.onethink.cn" target="_blank">OneThink</a>管理平台</div>
                    <div class="fr">V1.1.141101</div>
                </div>
            </div>
        </div>
        <!-- /内容区 -->
        <script type="text/javascript">
            (function(){
                var ThinkPHP = window.Think = {
                    "ROOT"   : "/ot", //当前网站地址
                    "APP"    : "/ot/admin.php?s=", //当前项目地址
                    "PUBLIC" : "/ot/Public", //项目公共目录地址
                    "DEEP"   : "/", //PATHINFO分割符
                    "MODEL"  : ["3", "", "html"],
                    "VAR"    : ["m", "c", "a"]
                }
            })();
        </script>
        <script type="text/javascript" src="/ot/Public/static/think.js"></script>
        <script type="text/javascript" src="/ot/Public/Admin/js/common.js"></script>
        <script type="text/javascript">
            +function(){
                var $window = $(window), $subnav = $("#subnav"), url;
                $window.resize(function(){
                    $("#main").css("min-height", $window.height() - 130);
                }).resize();

                /* 左边菜单高亮 */
                url = window.location.pathname + window.location.search;
                url = url.replace(/(\/(p)\/\d+)|(&p=\d+)|(\/(id)\/\d+)|(&id=\d+)|(\/(group)\/\d+)|(&group=\d+)/, "");
                $subnav.find("a[href='" + url + "']").parent().addClass("current");

                /* 左边菜单显示收起 */
                $("#subnav").on("click", "h3", function(){
                    var $this = $(this);
                    $this.find(".icon").toggleClass("icon-fold");
                    $this.next().slideToggle("fast").siblings(".side-sub-menu:visible").
                    prev("h3").find("i").addClass("icon-fold").end().end().hide();
                });

                $("#subnav h3 a").click(function(e){e.stopPropagation()});

                /* 头部管理员菜单 */
                $(".user-bar").mouseenter(function(){
                    var userMenu = $(this).children(".user-menu ");
                    userMenu.removeClass("hidden");
                    clearTimeout(userMenu.data("timeout"));
                }).mouseleave(function(){
                    var userMenu = $(this).children(".user-menu");
                    userMenu.data("timeout") && clearTimeout(userMenu.data("timeout"));
                    userMenu.data("timeout", setTimeout(function(){userMenu.addClass("hidden")}, 100));
                });

                /* 表单获取焦点变色 */
                $("form").on("focus", "input", function(){
                    $(this).addClass('focus');
                }).on("blur","input",function(){
                    $(this).removeClass('focus');
                });
                $("form").on("focus", "textarea", function(){
                    $(this).closest('label').addClass('focus');
                }).on("blur","textarea",function(){
                    $(this).closest('label').removeClass('focus');
                });

                // 导航栏超出窗口高度后的模拟滚动条
                var sHeight = $(".sidebar").height();
                var subHeight  = $(".subnav").height();
                var diff = subHeight - sHeight; //250
                var sub = $(".subnav");
                if(diff > 0){
                    $(window).mousewheel(function(event, delta){
                        if(delta>0){
                            if(parseInt(sub.css('marginTop'))>-10){
                                sub.css('marginTop','0px');
                            }else{
                                sub.css('marginTop','+='+10);
                            }
                        }else{
                            if(parseInt(sub.css('marginTop'))<'-'+(diff-10)){
                                sub.css('marginTop','-'+(diff-10));
                            }else{
                                sub.css('marginTop','-='+10);
                            }
                        }
                    });
                }
            }();
        </script>

        <script src="/ot/Public/static/thinkbox/jquery.thinkbox.js"></script>

        <script type="text/javascript">
            //搜索功能
            $("#search").click(function(){
                var url = $(this).attr('url');
                var query  = $('.search-form').find('input').serialize();
                query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
                query = query.replace(/^&/g,'');
                if( url.indexOf('?')>0 ){
                    url += '&' + query;
                }else{
                    url += '?' + query;
                }
                window.location.href = url;
            });
            //回车搜索
            $(".search-input").keyup(function(e){
                if(e.keyCode === 13){
                    $("#search").click();
                    return false;
                }
            });
            //导航高亮
            highlight_subnav('/ot/admin.php?s=/User/index.html');
        </script>


    </body>
</html>